#ifndef CIRCLE_H
#define CIRCLE_H

#include <cmath>

#include "Shape.h"

double const PI=4*std::atan(1);

class Rectangle;

//Circular collision shape
class Circle: public Shape{
private:
    double radius_;

    const bool overlaps(const Rectangle* r) const;
    const bool overlaps(const Circle* c) const;
protected:
    Circle(const Point2& pos, const double& radius);
public:
    static Circle* getInstance(const Point2& pos, const double& radius);

    const bool contains(const Point2& p) const;
    const bool overlaps(const Shape* other) const;

    double getArea() const;
    
    const Rectangle* boundingRect() const;

    Shape* rotate(const double& angle);

    const double& getRadius() const;
};

#endif
